import 'package:todo_app/thirdpart/flutter_fms/flutter_fms.dart';
import 'package:todo_app/utils/call/CallHelper.dart';
import 'package:todo_app/utils/call/contexts/TalkUIContext.dart';

/// 通话中
class TalkState extends IState {

  TalkUIContext? context;

  TalkState({ this.context });

  @override
  String get name => "TaskState";

  @override
  void onEnter(IState? prev) {
    print("===========> 进入通话");
    if(prev is! TalkState) {
      CallHelper.connectedFromState(context?.room);
    }
  }

  @override
  void onExit(IState? next) {
    print("===========> 离开通话");
  }

  @override
  String get tag => "TalkUI";
}